
OPTION(SYSTEM_INSTALL "install file in /usr/lib/files, /usr/share/doc/pylot, ..." OFF)
# Dont forget to update cmake/Templates/hardbook.csv.in to make path available from python scripts

# Unix vars
SET(PYLOTPATH_BIN bin/ CACHE PATH "executables")
SET(PYLOTPATH_SHARE share CACHE PATH "shared resources (meshes, icons, ...)")
SET(PYLOTPATH_I18N_GETTEXT i18n CACHE PATH "gettext i18n resources (*.mo)")
SET(PYLOTPATH_I18N_QT i18n CACHE PATH "qt i18n resources (*.qm)")
SET(PYLOTPATH_LIB lib/ CACHE PATH "installed libraries")
SET(PYLOTPATH_LIB_DEBUG lib_debug/ CACHE PATH "debug libraries")
SET(PYLOTPATH_LIB_STD ${PYLOTPATH_LIB} CACHE PATH "not debug libraries")
SET(PYLOTPATH_INCLUDE include/ CACHE PATH "C++ headers")
SET(PYLOTPATH_DOC doc CACHE PATH "pylot documentation")
SET(PYLOTPATH_ETC etc/ CACHE PATH "configuration files")
SET(PYLOTPATH_PYTHON python CACHE PATH "python modules")
SET(PYLOTPATH_PKGCONFIG ${PYLOTPATH_LIB}/pkgconfig CACHE PATH "pkg-config")
SET(PYLOTPATH_CMAKE ${PYLOTPATH_SHARE}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} CACHE PATH "CMake modules")

# pyLot vars
SET(PYLOTPATH_MESH ${PYLOTPATH_SHARE}/Mesh CACHE PATH "meshes")
SET(PYLOTPATH_MESHERS ${PYLOTPATH_BIN}/Meshers CACHE PATH "Meshers")
SET(PYLOTPATH_MESHREADERS ${PYLOTPATH_BIN}/MeshReaders CACHE PATH "Mesh readers")
SET(PYLOTPATH_MESHTOOLS ${PYLOTPATH_BIN}/MeshTools CACHE PATH "Mesh tools")
SET(PYLOTPATH_EXAMPLES Examples CACHE PATH "project examples")
SET(PYLOTPATH_TESTS ../Tests CACHE PATH "Various tests")
SET(PYLOTPATH_TESTCASES TestCases/ CACHE PATH "test cases")

SET(PYLOTPATH_EXTENSIONS $ENV{HOME}/pylot-extensions CACHE PATH "pylot and pyLot extensions")

# Other
SET (BLENDERPATH_SCRIPTS $ENV{HOME}/.blender/scripts CACHE PATH "Blender script directory")

# if you change PYLOTPATH_CMAKE, please also change value in pylot/data/cmakelists

IF(SYSTEM_INSTALL)
  SET(PYLOT_NAME pylot) #name used for paths. Ex: /usr/share/doc/pylot

  # Unix vars
  SET(PYLOTPATH_BIN bin/ CACHE PATH "" FORCE)
  SET(PYLOTPATH_SHARE share/${PYLOT_NAME} CACHE PATH "" FORCE)
  SET(PYLOTPATH_I18N_GETTEXT share/locale CACHE PATH "" FORCE)
  SET(PYLOTPATH_I18N_QT ${PYLOTPATH_SHARE}/i18n CACHE PATH "" FORCE)
  SET(PYLOTPATH_LIB lib/ CACHE PATH "" FORCE)
  SET(PYLOTPATH_LIB_DEBUG ${PYLOTPATH_LIB} CACHE PATH "debug libraries")
  SET(PYLOTPATH_LIB_STD ${PYLOTPATH_LIB} CACHE PATH "not debug libraries")
  SET(PYLOTPATH_INCLUDE include/ CACHE PATH "" FORCE)
  SET(PYLOTPATH_DOC share/doc/${PYLOT_NAME} CACHE PATH "" FORCE)
  SET(PYLOTPATH_ETC ${PYLOTPATH_SHARE}/etc CACHE PATH "" FORCE)
  SET(PYLOTPATH_PYTHON lib/python2.5/site-packages/ CACHE PATH "" FORCE)
  SET(PYLOTPATH_PKGCONFIG ${PYLOTPATH_LIB}/pkgconfig CACHE PATH "" FORCE)
  SET(PYLOTPATH_CMAKE share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} CACHE PATH "" FORCE)

  # pyLot vars
  SET(PYLOTPATH_MESH ${PYLOTPATH_SHARE}/Mesh CACHE PATH "" FORCE)
  SET(PYLOTPATH_MESHERS ${PYLOTPATH_SHARE}/tools/Meshers CACHE PATH "" FORCE)
  SET(PYLOTPATH_MESHREADERS ${PYLOTPATH_SHARE}/tools/MeshReaders CACHE PATH "" FORCE)
  SET(PYLOTPATH_MESHTOOLS ${PYLOTPATH_SHARE}/tools/MeshTools CACHE PATH "" FORCE)
  SET(PYLOTPATH_EXAMPLES ${PYLOTPATH_SHARE}/Examples CACHE PATH "" FORCE)
  SET(PYLOTPATH_TESTS ${PYLOTPATH_SHARE}/Tests CACHE PATH "" FORCE)

  # Other
  SET (BLENDERPATH_SCRIPTS "/usr/lib/blender/scripts" CACHE PATH "" FORCE)

ELSE(SYSTEM_INSTALL)
  # NOTHING TO DO, we kept initial values
ENDIF(SYSTEM_INSTALL)

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
  SET(PYLOTPATH_LIB ${PYLOTPATH_LIB_DEBUG} CACHE PATH "" FORCE)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")

